<template>
	<view class="bgimage">
		<view class="uni-tab-bar">
			<swiperTabHead :tabBars="tabBars" :tabIndex="tabIndex" @tabtap="tabtap"></swiperTabHead>
			<swiper class="swiper-box flex" :style="{height:swiperheight+'px'}" :current="tabIndex" @change="tabChange">
				
				<swiper-item class="flex" v-for="(items,index) in newslist" :key="index">
					<scroll-view scroll-y="true" class="list flex">
						<template v-if="tabIndex==0">
							<view scroll-y class="table">
								<view class="tr tr-trPlan tr-trPlan-break2  gray">
									<view>
										<h3
											style="float: left;width: 100%; margin-left: 25rpx;margin: 25rpx;color: #000000;font-weight: 600;font-size: 30rpx;">
											已关注活动</h3>
									</view>
								</view>
								<view class="tr" style="float: left;">
									<view class="td ">
										活动名称
									</view>
									<view class="td ">
										活动类型
									</view>
									<view class="td ">
										活动截止时间
									</view>
									<view class="td ">
										具体详情
									</view>

								</view>

								<block v-for="(item,index) in  collectList">

									<view class="tr gray" v-if="index % 2 == 0">
										<view class="td gray">
											{{item.name}}
										</view>
										<view class="td gray">
											{{item.infoType}}
										</view>
										<view class="td gray">
											{{item.endTime}}
										</view>
										<view class="td gray">
											<navigator style="float: left;" class="collectDetail"
												url="../huodong/huodong_detail"> 详情</navigator>
										</view>
									</view>
									<view class="tr" v-else>
										<view class="td ">
											{{item.name}}
										</view>
										<view class="td ">
											{{item.infoType}}
										</view>
										<view class="td ">
											{{item.endTime}}
										</view>

										<view class="td">
											<navigator style="float: left;" class="collectDetail"
												url="../huodong/huodong_detail"> 详情</navigator>
										</view>
										<!-- <view v-for="(item2,index) in item" :key="index" class="td">{{item2}}</view> -->
									</view>
								</block>
							</view>
						</template>

						<template v-if="tabIndex==1">
							<view scroll-y class="tabIndex tabIndex-tabIndex1">
								<view class="tr tr-trPlan tr-trPlan-break2  gray" style="width: 340rpx;">
									<view>
										<h3
											style="float: left;width: 100%; margin-left: 25rpx;margin: 25rpx;color: #000000;font-weight: 600;font-size: 30rpx;">
											已参加活动</h3>
									</view>
								</view>
								<block v-for="(item,index) in applyList" v-if="index <= endIndex2">

									<view class="tr gray tr-trJoin" v-if="index % 2 == 0">
										<view class="td  gray">
											{{item.name}}
										</view>
										<view class="td  gray">
											{{item.infoType}}
										</view>
									</view>
									<view class="tr tr-trJoin " v-else>
										<view class="td ">
											{{item.name}}
										</view>
										<view class="td ">
											{{item.infoType}}
										</view>
									</view>
								</block>
							</view>
						</template>

						<template v-if="tabIndex==2">
							<view scroll-y class="table">
								<view class="tr tr-trPlan tr-trPlan-break2  gray">
									<!-- <text  style="font-weight: 600;">已报名活动</text> -->
									<view>
										<h3
											style="float: left;width: 100%; margin-left: 25rpx;margin: 25rpx;color: #000000;font-weight: 600;font-size: 30rpx;">
											已报名活动</h3>
									</view>
								</view>
								<view class="tr  " style="float: left;">
									<view class="td gray">
										活动名称
									</view>
									<view class="td gray">
										年级对象
									</view>
									<view class="td gray">
										活动截止时间
									</view>
									<view class="td gray">
										是否关注
									</view>

								</view>
								<block v-for="(item,index) in joinList" v-if="index <= endIndex3">

									<view class="tr " v-if="index % 2 == 0">

										<view class="td ">
											{{item.name}}
										</view>
										<view class="td">
											{{item.grade}}
										</view>
										<view class="td">
											{{item.endTime}}
										</view>
										<view class="td" v-if="item.isFollow">
											<navigator style="float: left;" class="detail "
												url="../huodong/huodong_detail">已关注 | 详情</navigator>
										</view>
										<view class="td" v-else>
											<navigator style="float: left;" class="detail "
												url="../huodong/huodong_detail">未关注 | 详情</navigator>
										</view>

									</view>
									<view class="tr" v-else>
										<view class="td gray">
											{{item.name}}
										</view>
										<view class="td gray">
											{{item.grade}}
										</view>
										<view class="td gray">
											{{item.endTime}}
										</view>
										<view class="td gray " v-if="item.isFollow">
											<navigator style="float: left;" class="detail "
												url="../huodong/huodong_detail">已关注 | 详情</navigator>
										</view>
										<view class="td gray" v-else>
											<navigator style="float: left;" class="detail "
												url="../huodong/huodong_detail">未关注 | 详情</navigator>
										</view>

									</view>


								</block>
								<!-- <view style="background-color:#0081FF ;color: #000000; width: 400rpx;height: 30rpx;" v-for="(item,index) in classList2" > -->
								<view style="background-color:#0081FF ; color: #626262; width: 400rpx;height: 30rpx;"
									v-for="(iteM,indexx) in classList2.classes">
									11{{iteM.class}}11111111
								</view>
								<!-- </view> -->
							</view>

						</template>

						<template v-if="tabIndex==3" class="flex">


							<!-- 			<movable-area style="position: absolute;  width: 720rpx;height: 1000rpx;">
								<movable-view style=" z-index: 100;" direction="all">
									<image id="fu" class="fu fuAnimation1" style="position: absolute;" @click="add()">
									</image>

								</movable-view>
								<movable-view direction="all" style=" z-index: 100;">
									<image class="fu2" style="position: absolute;" @click="remove()"></image>

								</movable-view>
							</movable-area> -->



							<scroll-view scroll-y scroll-x class="tabIndex tabIndex-tabIndex3">
								<view>
									<h3
										style="float: left;width: 100%; margin-left: 25rpx;margin: 25rpx;color: #000000;font-weight: 600;font-size: 30rpx;">
										课程表</h3>
								</view>
								<block v-for="(item0,index) in classList3" v-if="index <= endIndex4">
									<view>
										<view v-if="index==0">
											<view class="tr  tr-trPlan">
												<view class="td " style="color: #626262; background-color: #f0f6f6;">
													时间\星期
												</view>
												<!-- <view class="td gray td-plan">
													星期一
												</view> -->

												<view v-for="(item8,indexWeek) in ['一','二','三','四','五','六','日']">
													<view class="td  td-plan"
														style="color: #535353; background-color: #ffffff;">
														星期{{item8}}
													</view>
												</view>

											</view>
											<view class="tr  tr-trPlan">
												<view class=" td-plan" v-for="(itemClass,index2) in classList2"
													v-show="index2==index">
													<view class="td  " v-show="index2==index" style="color: #626262; ">
														{{itemClass.time}}
													</view>
													<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
														<input :data-row="index" :data-cols="indexClass2"
															v-model="itemClass.classes[indexClass2]" @input="openModal"
															@click="changeId" @blur="onBlur" class=" td gray td-plan"
															type="text" />
													</view>
												</view>
											</view>
										</view>


										<view v-else-if="(index % 2 == 0)&&(index <= 4)">
											<view v-if="index == 4">
												<view class="tr  tr-trPlan tr-trPlan-break"
													style="background-color:#f7f7f7;">
													<text style="font-weight: 600; color: #5e5c61">休息</text>
												</view>
												<view class="tr tr-trPlan" style="width: 300rpx;">
													<view class="td " v-show="indextime==4"
														v-for="(itemtime,indextime) in classList2"
														style="color: #757575; background-color:#ffffff;">
														{{itemtime.time}}

													</view>
													<view class=" td-plan" v-for="(itemClass,index2) in classList2"
														v-show="index2==4">
														<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
															<input :data-row="index" :data-cols="indexClass2"
																v-model="itemClass.classes[indexClass2]"
																@input="openModal" @click="changeId" @blur="onBlur"
																class="td td-plan" type="text"
																style="z-index: 99;margin: 0;" />




														</view>

													</view>
												</view>

											</view>

											<view v-else class="tr gray tr-trPlan">
												<!-- 	<view class="td gray " v-show="index==2" v-for="(itemtime,indextime) in classList2">
													{{itemtime.time}}{{index}}
												</view>
										
													<view  class=" td-plan"  v-for="(itemClass,index2) in classList2" v-show="index2==1"
														>
													<view  v-for="(itemclassitem,indexClass2) in itemClass.classes">
													<input :data-cols="index" v-model="itemClass.classes[indexClass2]"
														@input="openModal" @click="changeId" @blur="onBlur"
														  class="gray td td-plan" type="text" />
														</view>
															</view> -->
												<view class=" td-plan" v-for="(itemClass,index2) in classList2"
													v-show="index2==index">
													<view class="td gray " v-show="index2==index"
														style="color: #626262; background-color:#ffffff;">
														{{itemClass.time}}
													</view>
													<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
														<input :data-row="index" :data-cols="indexClass2"
															v-model="itemClass.classes[indexClass2]" @input="openModal"
															@click="changeId" @blur="onBlur" class=" td gray td-plan"
															type="text" />
													</view>
												</view>
											</view>


										</view>
										<view class="tr gray tr-trPlan"
											v-else-if="(index > 4)&&(index %2 != 0)&&(index <8)">
											<view class=" td-plan" v-for="(itemClass,index2) in classList2"
												v-show="index2==index">
												<view class="td gray " v-show="index2==index"
													style="color: #626262; background-color:#ffffff;">
													{{itemClass.time}}
												</view>
												<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
													<input :data-row="index" :data-cols="indexClass2"
														v-model="itemClass.classes[indexClass2]" @input="openModal"
														@click="changeId" @blur="onBlur" class=" td gray td-plan"
														type="text" />
												</view>
											</view>

										</view>

										<!-- <view class="td gray td-plan"
												v-for="(item8,index8) in [0,1,2,3,4,5,6]">
												<input  :data-cols="index" v-model="index8"
													@input="openModal" @click="changeId" @blur="onBlur" class="td "
													type="text" />
											</view> -->

										<!-- 
										</view> -->
										<view v-else-if="index >= 8">
											<view class="" v-if="index == 8">
												<view class="tr tr-trPlan tr-trPlan-break"
													style="background-color: #ffffff;">
													<text style="font-weight: 600;color: #5e5c61;">休息</text>
												</view>
												<view class="tr gray">
													<view class=" td-plan" v-for="(itemClass,index2) in classList2"
														v-show="index2==index">
														<view class="td gray " v-show="index2==index"
															style="color: #626262; background-color:#ffffff;">
															{{itemClass.time}}
														</view>
														<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
															<input :data-row="index" :data-cols="indexClass2"
																v-model="itemClass.classes[indexClass2]"
																@input="openModal" @click="changeId" @blur="onBlur"
																class=" td gray td-plan" type="text" />
														</view>
													</view>
													<!-- <view class="td gray">
														
													</view>
													<view v-for="(item8,index) in [0,1,2,3,4,5,6]"
														class="td  gray td-plan">
													
														<input  :data-cols="index"
															v-model="index" @input="openModal" @click="changeId"
															@blur="onBlur" class="td gray" type="text" />
													</view> -->
												</view>
											</view>
											<view class="" v-else-if="index ==10">
												<view class="tr  tr-trPlan">
													<view class=" td-plan" v-for="(itemClass,index2) in classList2"
														v-show="index2==index">
														<view class="td gray " v-show="index2==index"
															style=" background-color:#ffffff;">
															{{itemClass.time}}
														</view>
														<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
															<input :data-row="index" :data-cols="indexClass2"
																v-model="itemClass.classes[indexClass2]"
																@input="openModal" @click="changeId" @blur="onBlur"
																class=" td gray td-plan" type="text" />
														</view>
													</view>
													<!-- <view class="td gray">
														
													</view>
													<view v-for="(item8,index) in [0,1,2,3,4,5,6]"
														class="td  td-plan">
														
														<input :data-cols="index"
															v-model="index" @input="openModal" @click="changeId"
															@blur="onBlur" class="td gray" type="text" />
													</view> -->
												</view>
											</view>
											<view class="tr  tr-trPlan" v-else>
												<view class=" td-plan" v-for="(itemClass,index2) in classList2"
													v-show="index2==index">
													<view class="td " v-show="index2==index"
														style="color: #626262; background-color:#ffffff;">
														{{itemClass.time}}
													</view>
													<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
														<input :data-cols="index"
															v-model="itemClass.classes[indexClass2]" @input="openModal"
															@click="changeId" @blur="onBlur" class=" td td-plan"
															type="text" />
													</view>
												</view>
												<!-- <view class="td ">
													
												</view>
												<view class="td  td-plan"
													v-for="(item8,index) in [0,1,2,3,4,5,6]">
													<input :data-cols="index" v-model="index"
														@input="openModal" @click="changeId" @blur="onBlur" class="td "
														type="text" />
												</view> -->

											</view>


										</view>

										<view class="tr  tr-trPlan" v-else>
											<view class=" td-plan" v-for="(itemClass,index2) in classList2"
												v-show="index2==index">
												<view class="td " v-show="index2==index"
													style="color: #626262; background-color:#ffffff;">
													{{itemClass.time}}
												</view>
												<view v-for="(itemclassitem,indexClass2) in itemClass.classes">
													<input :data-row="index" :data-cols="indexClass2"
														v-model="itemClass.classes[indexClass2]" @input="openModal"
														@click="changeId" @blur="onBlur" class=" td td-plan"
														type="text" />
												</view>
											</view>
											<!-- <view class="td ">
												
											</view>
											<view class="td  td-plan"
												v-for="(item8,index) in [1,1,2,3,4,5,6]">
												<input :data-cols="index" v-model="index"
													@input="openModal" @click="changeId" @blur="onBlur" class="td "
													type="text" />
											</view> -->

										</view>


										<!-- 			<view class="tr tr-trPlan"  v-else  >
											<view >
											<view class="td">
											课程
											</view>
													<view  class="td" >
														{{item.time}}
													</view>
											</view> -->




										<!-- 	<view v-if="indexTime %2!=0">
												{{itemTime}}
											</view> -->
										<!-- 	<view class="td">
											{{itemTime2}}
											</view> -->
										<!-- 	<view class=""  v-for="(item2,index) in item">
												<input  :data-row="index1" :data-cols="index"  v-if="(index==1)||(index==2)"
													v-model="item[index]" @input="openModal" @click="changeId"
													@blur="onBlur" class="td" type="text" />
													<view  class="td " v-else>
														{{item[index]}}
													</view>
											</view> -->


										<!-- <input @click="openModal" v-for="(item2,index) in item" :value="item2"
											class="td" type="text" /> -->
										<!-- <input  @input="openModal" v-for="(item2,index) in item" v-model="item2"
												class="td" type="text" /> -->
										<!-- </view> -->
									</view>
								</block>
							</scroll-view>



							<!-- 	<uni-pagination class="page" v-if="tables4" title="标题文字" :total='total' :current="current"
								@change='uni_pagination_change'>
							</uni-pagination> -->
							<!-- @clickRight="clickRight" @clickLeft="clickLeft"  :currentIndex='currentIndex' -->
						</template>
					</scroll-view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>
<!-- <script type="text/javascript" src="jquery.min.js"></script> -->

<script>
	import swiperTabHead from "../../components/swiper-tab-head.vue";

	// import uniPagination from '../../components/uni-pagination/uni-pagination.vue'

	export default {

		data() {
			return {
				// currentIndex:'',
				// tables4: uni.getStorageSync("tables4"),
				student: uni.getStorageSync("student"),
				row: 0,
				cols: 0,
				class: '',
				endIndex: 11,
				endIndex2: 11,
				endIndex3: 11,
				endIndex4: 11,
				firstIndex: 0,
				lastIndex: 11,
				current: 1,
				total: '',
				isActive: 1,
				item2: '',
				id: 1,
				swiperheight: 500,
				tables4: [
					'08:00-08:45',
					'09:00-09:45',
					'10:00-10:45',
					'11:00-11:45',
					'14:30-15:15',
					'15:25-16:10',
					'16:25-17:15',
					'17:25-18:10',
					'19:30-20:15',
					'20:25-21:10',
					'21:20-22:05'
				],
				classList: [],
				classList3: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
				classList4: [],
				list1: [],
				list2: [],
				list3: [],
				list4: [],
				list5: [],
				list5: [],
				list5: [],
				list5: [],
				list5: [],
				list5: [],
				list5: [],
				classList2: [],
				tables5: [],
				tables2: [
					['已参加比赛', '所得综测分'],
					['互联网加', '2'],
					['第14界全国大学生互联网加', '3'],
					['第14界全国大学生创业大赛校赛', '4'],
					['第14界全国大学生创业大赛校赛', '2'],
					['第14界全国大学生创业大赛校赛', '3'],
					['第14界全国大学生创业大赛校赛', '1'],
					['第14界全国大学生创业大赛校赛', '核算中'],
				],
				collectList: '',
				applyList: '',
				joinList: '',
				newslist: [{}, {}, {}, {}],
				tabIndex: 0, // 选中的
				tabBars: [{
						name: "已关注活动",
						id: "tuijian"
					},
					{
						name: "已参加活动",
						id: "tiyu"
					},
					{
						name: "已报名活动",
						id: "redian"
					},
					{
						name: "活动计划",
						id: "caijing"
					}
				]
			}
		},
		onPullDownRefresh() {
			console.log("上拉刷新数据")
			setTimeout(() => {
				if (this.tabIndex == 0) {
					this.endIndex = 11;
				} else if (this.tabIndex == 1) {
					this.endIndex2 = 11;
				} else if (this.tabIndex == 2) {
					this.endIndex3 = 11;
				} else {
					this.endIndex4 = 11;
				}
			}, 1000)

			setTimeout(() => {

				uni.stopPullDownRefresh()

			}, 1000)

		},
		onReachBottom() {
			console.log("下拉触底加载")
			setTimeout(() => {
				if (this.tabIndex == 0) {
					this.endIndex = this.endIndex + 3;
				} else if (this.tabIndex == 1) {
					this.endIndex2 = this.endIndex2 + 3;
				} else if (this.tabIndex == 2) {
					this.endIndex3 = this.endIndex3 + 3;
				} else {
					this.endIndex4 = this.endIndex4 + 3;
				}

			}, 900)

		},
		onLoad() {
			console.log("拿到的数据");
			console.log(this.student.no + this.student.password)
			this.getCollectList();
			this.getJoinList();
			this.getClassList();
			this.getApplyList();
			console.log("我执行力")
			uni.getSystemInfo({
				success: (res) => {
					let height = res.windowHeight - uni.upx2px(100)
					this.swiperheight = height;
				}
			})
			this.total = this.tables4.length;
			// this.id = this.total;
			// this.currentIndex=1;
			// if((this.tables4.length%12==0)){
			// 	this.currentIndex=Math.ceil((this.tables4.length)/12);
			// }else if((this.tables4.length/12==0)){
			// 	this.currentIndex==1;
			// }else{
			// 	this.currentIndex=Math.ceil((this.tables4.length)/12);
			// 	console.log(Math.ceil((this.tables4.length)/12)+"(this.tables4.length)/12+");
			// }

		},
		methods: {
			getApplyList() {
				console.log("这是课表")
				const res13 = this.$myRequest({
					url: '/apply/findJoinedActive',
					data: {
						"no": this.student.no
					},
					method: 'POST',
					headers: {
						"content-Type": "application/json"
					}
				}).then(res => {
					console.log("拿到的数据" + res);
					console.log(this.student.no + this.student.password)
					if (res.data) {
						console.log("成功" + res.data.data)
						this.applyList = res.data.data.actives;
						console.log("已参加列表" + JSON.stringify(this.applyList));

					}
				})
			},
			getClassList() {
				console.log("这是课表")
				const res = this.$myRequest({
					url: '/class-schedule/classList',
					data: {
						"no": this.student.no,
						"password": this.student.password
					},
					method: 'POST',
					headers: {
						"content-Type": "application/json"
					}
				}).then(res => {
					console.log("拿到的数据" + res);
					console.log(this.student.no + this.student.password)
					if (res.data) {
						console.log("成功" + res.data.data)
						this.classList = res.data.data;
						console.log("课表列表" + JSON.stringify(this.classList));
						this.classList.forEach(item => {
							this.tables5.push({
								week: item.week,
								class: [
									item.class1,
									item.class2,
									item.class3,
									item.class4,
									item.class5,
									item.class6,
									item.class7,
									item.class8,
									item.class9,
									item.class10,
									item.class11,
								]
							})
						})
						// for (let i = 0; i < this.classList.length; i++) {
						// 	this.tables5.push({
						// 		week: this.classList[i].week,
						// 		class: [
						// 			this.classList[i].class1,
						// 			this.classList[i].class2,
						// 			this.classList[i].class3,
						// 			this.classList[i].class4,
						// 			this.classList[i].class5,
						// 			this.classList[i].class6,
						// 			this.classList[i].class7,
						// 			this.classList[i].class8,
						// 			this.classList[i].class9,
						// 			this.classList[i].class10,
						// 			this.classList[i].class11,
						// 		]
						// 	})
						// }
						console.log(`==>>>>>this.tables5this.tables5${JSON.stringify(this.tables5)}`)
						this.tables4.forEach((item1, index1) => {
							this.tables5.forEach((item2, index2) => {
								this.classList4.push(
									item2.class[index1]
								)
								if (index2 == 6) {
									console.log(this.classList4 + "classlist44444"); -
									this.classList2.push({
										time: this.tables4[index1],
										classes: this.classList4
									})
									this.classList4 = [];
								}
							})
						})
						// for (let i = 0; i < 11; i++) {
						// 	for (let j = 0; j < 7; j++) {
						// 		this.classList4.push(
						// 			this.tables5[j].class[i]
						// 		)
						// 		if (j == 6) {
						// 			console.log(this.classList4 + "classlist44444"); -
						// 			this.classList2.push({
						// 				time: this.tables4[i],
						// 				classes: this.classList4
						// 			})
						// 			this.classList4 = [];
						// 		}
						// 	}
						// }
						// console.log(JSON.stringify(this.list1)+"list1list1111");
						console.log(JSON.stringify(this.classList2) +
							"thisclassList2 )classList2 )classList2 )classList2 ).tables5")
						// console.log(JSON.stringify(this.classList2) + "this.classlistthis.classlist2")
					}

				})
			},
			getCollectList() {
				const res = this.$myRequest({
					url: '/collect/collectList',
					data: {
						"no": this.student.no,
						"password": this.student.password
					},
					method: 'POST',
					headers: {
						"content-Type": "application/json"
					}
				}).then(res => {
					console.log("拿到的数据" + res);
					console.log(this.student.no + this.student.password)
					if (res.data.data) {
						console.log("成功" + res.data.data)
						this.collectList = res.data.data;
						console.log("关注列表" + JSON.stringify(this.collectList));
						console.log(this.collectList[0].content)
					}

				})
			},
			getJoinList() {
				console.log("我是已报名表");
				const res2 = this.$myRequest({
					url: '/apply/findApplyActive',
					data: {
						"no": this.student.no,
						"password": this.student.password
					},
					method: 'POST',
					headers: {
						"content-Type": "application/json"
					}
				}).then(res => {
					console.log("拿到的数据" + res);
					console.log(this.student.no + this.student.password)
					if (res.data.data) {
						console.log("成功" + res.data)
						this.joinList = res.data.data;
						console.log("报名列表" + JSON.stringify(this.joinList));
						console.log(this.joinList[1].activeId)
					} else {
						console.log("失败")
					}

				})
			},
			onJoin() {
				uni.showToast({
					title: '报名成功',
					duration: 2000
				});
				uni.showModal({
					title: '报名成功',
					content: '您实际预约天数不足，未满足续约条件。',
					success: function(res) {
						if (res.confirm) {
							uni.switchTab({
								url: "../yuyue/yuyue"
							})
						} else if (res.cancel) {
							uni.switchTab({
								url: "../xuyue/xuyue"
							})
						}
					}
				});
			},
			clickRight: function() {
				this.currentIndex += 1;
				console.log("我变了this.currentIndex" + this.currentIndex)
			},
			clickLeft: function() {
				this.currentIndex -= 1;
				console.log("我变了this.currentIndex" + this.currentIndex)
			},

			uni_pagination_change(e) {
				this.tables4.length = this.total;
				this.current = e.current;
				console.log(e.current + "e.current;")
				if (e.type == 'next') {
					this.firstIndex = this.firstIndex + 12;
					this.lastIndex = this.lastIndex + 12;
					// this.currentIndex ++;
					// this.current++;
					console.log(this.current + "this.current++;");
				} else {
					this.firstIndex = this.firstIndex - 12;
					this.lastIndex = this.lastIndex - 12;
					// this.currentIndex --;
					console.log(this.current + "this.current--;");
				}

				// this.getcompanyId();
				console.log(this.tables4.length + "changdu");
				//发送tables
				// const res = that.$myRequest({
				// 	url: "/student/provideStudentOneSeat",
				// 	data: {
				// 		"bEndTime": "",
				// 		"bStartTime": "",
				// 		"rId": item.rId,
				// 		"sId": sId,
				// 	},
				// 	method: 'POST',
				// }).then(res => {
				// 	console.log("res=>", res)
				// uni.setStorage({
				// 	key:"student",
				// 	data:res.data.data
				// })


				// })

			},
			checked(type) {
				this.isActive = type;
			},
			changeId(e) {
				let row = e.target.dataset.row;
				let cols = e.target.dataset.cols;
				this.row = row;
				this.cols = cols;
				if (typeof(this.row) == 'undefined') this.row = 9;
				console.log(this.row + "changeIdid  ro行数");
				console.log(this.cols + "changeId cols列数");
			},

			openModal: function(e) {
				const self = this;
				clearTimeout(self.tiems);
				self.tiems = setTimeout(() => {
					let value = e.target.value;
					console.log(value + "此对象输入的value值");
					console.log(this.row + "数据id  ro行数");
					console.log(this.cols + "数据id  ro行数");
					this.tables4.forEach((item, index) => {
						if (this.row == index) {
							console.log(`${JSON.stringify( this.classList[0])}值值☞`)
							console.log(`${Object.keys( this.classList[this.cols])[this.row+4]}值值☞`)
							Object.keys(this.classList[this.cols]).forEach(key => {
								if (key == Object.keys(this.classList[this.cols])[this.row +
									4]) {
									this.classList[this.cols].key = value;
								}
							})
							console.log(
								`${ this.classList[this.cols].class1=value} this.classList[this.cols].class1=value;`
								)
						}
					})

					//随时监听新数据，随时将值发送给接口，以免数据丢失
					Object.keys(this.classList[this.cols]).forEach(key => {
						if (key == Object.keys(this.classList[this.cols])[this.row + 4]) {
							this.classList[this.cols].key = value;
						}
					})
					const res = this.$myRequest({
						url: '/class-schedule/updateClass',
						data: {
							"id": this.cols + 1,
							"no": this.student.no,
							"time": "2022-04-01",
							"week": this.cols + 1,
							"class1": this.classList[this.cols].class1,
							"class2": this.classList[this.cols].class2,
							"class3": this.classList[this.cols].class3,
							"class4": this.classList[this.cols].class4,
							"class5": this.classList[this.cols].class5,
							"class6": this.classList[this.cols].class6,
							"class7": this.classList[this.cols].class7,
							"class8": this.classList[this.cols].class8,
							"class9": this.classList[this.cols].class9,
							"class10": this.classList[this.cols].class10,
							"class11": this.classList[this.cols].class11,
						},
						method: 'POST',
						headers: {
							"content-Type": "application/json"
						}
					}).then(res => {
						console.log(res)
					})
				}, 1000)


			},
			add() {
				// if(this.tables4.length % 12 == 0){
				// 	this.firstIndex=this.firstIndex+12;
				// 	this.lastIndex=this.lastIndex+12;
				// 	this.currentIndex += 1
				// 	console.log(this.currentIndex+"this.currentIndex")
				// }

				// console.log("当前页码加一发亮"+this.currentIndex)

				setTimeout(() => {
					let list = this.tables4;
					let id = this.id;
					list.splice(id, 0, ['', '', '']);
					this.tables4 = list;
					this.total = this.tables4.length;
					console.log("table.count栏数" + this.total);
					console.log("存了此对象活动计划页面数据table4")
					this.onBlur();

				}, 600)


			},
			remove() {
				// if(this.tables4.length % 12 == 0){
				// 	this.firstIndex=this.firstIndex-12;
				// 	this.lastIndex=this.lastIndex-12;
				// 	this.currentIndex -= 1
				// }

				// this.total--;
				setTimeout(() => {
					console.log("table.count栏数1" + this.tables4.length);
					let list = this.tables4;
					let id = this.id;
					// list.splice(id, 1);
					list.splice(id, 1);
					this.tables4 = list;
					this.total = this.tables4.length;
					console.log("table.count栏数" + this.tables4.length);
					console.log("total" + this.total);
					this.onBlur();
				}, 480)


			},
			inputChange(e) {

			},
			tabtap(index) {
				
					uni.showLoading({
						title: '加载中'
					});

					setTimeout(function() {
						uni.hideLoading();
					}, 1000);
				setTimeout(() => {
					this.tabIndex = index;
				}, 1000);
				console.log("点了" + index + "个导航栏")

			},
			tabtap2(index) {
				let id = index;
				console.log(id)
			},

			tabChange(e) {
				this.tabIndex = e.detail.current;
			},
			watch: {
				tabCur(val) {
					if (val == 0) {
						this.scrollLeft = this.oldScrollLeft;
						this.scrollLeft = 0;

					}
				}
			}
		},
		components: {
			swiperTabHead,

		}
	};
</script>
<style lang="scss">
	page {
		height: 105vh;
	}

	.page {
		position: absolute;
		margin-top: 1050rpx;
		width: 100%;
		/* border-radius: 50%; */
		/* background-color: white;
		width: 50rpx;
		height: 50rpx; */
		display: flex;
		justify-content: center;
	}

	.pNum1 {
		left: 30%;
	}

	.pNum2 {
		left: 50%;
	}

	.pNum3 {
		left: 70%;
	}

	.fu {
		-webkit-animation: ani1 2s linear infinite;
		box-shadow: 0 0 30px #ffffff;
		border-radius: 50%;
		z-index: 100;
		position: absolute;
		top: 40rpx;
		transform: translate(80%, -50%);
		width: 50rpx;
		height: 50rpx;
		border: 4rpx solid rgb(255, 253, 253);
		box-shadow: 0 0 10px #ffffff;
		background-color: #fff;
		background-image: url("data:image/svg+xml,%3Csvg t='1642243873011' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5188' width='200' height='200'%3E%3Cpath d='M512 992C246.912 992 32 777.088 32 512 32 246.912 246.912 32 512 32c265.088 0 480 214.912 480 480 0 265.088-214.912 480-480 480z m0-64c229.76 0 416-186.24 416-416S741.76 96 512 96 96 282.24 96 512s186.24 416 416 416z' p-id='5189'%3E%3C/path%3E%3Cpath d='M256 544a32 32 0 0 1 0-64h512a32 32 0 0 1 0 64H256z' p-id='5190'%3E%3C/path%3E%3Cpath d='M480 256a32 32 0 0 1 64 0v512a32 32 0 0 1-64 0V256z' p-id='5191'%3E%3C/path%3E%3C/svg%3E");
		background-size: cover;
		position: fixed;
	}


	.fu2 {
		-webkit-animation: ani1 2s linear infinite;
		box-shadow: 0 0 30px #ffffff;
		border-radius: 50%;
		z-index: 100;
		position: absolute;
		left: 100rpx;
		/* left: 81%;
	  top: 87%; */
		top: 40rpx;
		transform: translate(80%, -50%);
		width: 50rpx;
		height: 50rpx;
		border: 4rpx solid rgb(255, 253, 253);
		box-shadow: 0 0 10px #ffffff;
		background-color: #fff;
		background-image: url("data:image/svg+xml,%3Csvg t='1642243923801' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5981' width='200' height='200'%3E%3Cpath d='M512 938.666667C276.362667 938.666667 85.333333 747.637333 85.333333 512S276.362667 85.333333 512 85.333333s426.666667 191.029333 426.666667 426.666667-191.029333 426.666667-426.666667 426.666667z m0-64c200.298667 0 362.666667-162.368 362.666667-362.666667S712.298667 149.333333 512 149.333333 149.333333 311.701333 149.333333 512s162.368 362.666667 362.666667 362.666667zM352 480h320a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64z' p-id='5982'%3E%3C/path%3E%3C/svg%3E");
		background-size: cover;
		/* position: fixed; */
	}



	@keyframes ani1 {
		0% {
			box-shadow: 0 0 0px #ffffff;
		}

		25% {
			box-shadow: 0 0 20px #ffffff;
		}

		50% {
			box-shadow: 0 0 30px #ffffff;
		}

		75% {
			box-shadow: 0 0 40px #ffffff;
		}

		100% {
			box-shadow: 0 0 0px #ffffff;
		}
	}

	@-webkit-keyframes myfirst {
		0% {
			left: -150px;
			top: 0px;
		}

		25% {
			left: -150px;
			top: 0px;
		}

		50% {
			left: 0px;
			top: 0px;
		}

		75% {
			left: 0px;
			top: 0px;
		}

		100% {
			right: 0px;
			top: 0px;
		}
	}

	@-webkit-keyframes myfirst2 {
		0% {
			left: -200px;
			top: 40rpx;
		}

		25% {
			left: -200px;
			top: 40rpx;
		}

		50% {
			left: 0px;
			top: 40rpx;
		}

		75% {
			left: 0px;
			top: 40rpx;
		}

		100% {
			left: 0px;
			top: 40rpx;
		}
	}

	.bgimage {
		/* margin-top: 78%; */
		// background-repeat: no-repeat;
		// position: fixed;
		// z-index: -1;
		// background-size: 100%;
		// width: 100%;
		// min-height: 100%;
		// opacity: 0.7;
		background-color: #f7f7f7;
	}


	div,
	scroll-view,
	swiper {
		box-sizing: border-box;
	}

	.detail {
		margin-left: 8rpx;
	}

	.collectDetail {
		// margin-left: 60rpx;
		padding-left: 60rpx;
	}

	.wuc-tab {
		white-space: nowrap;
	}

	.wuc-tab-item {
		height: 90upx;
		display: inline-block;
		line-height: 90upx;
		margin: 0 10upx;
		padding: 0 20upx;

	}

	.wuc-tab-item.cur {
		border-bottom: 4upx solid;
	}

	.wuc-tab.fixed {
		position: fixed;
		width: 100%;
		top: 0;
		z-index: 1024;
		box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1);
	}

	.flex {
		height: 100%;
		width: 100%;
		text-align: center;

	}

	.flex {
		position: relative;
	}

	.text-center {
		text-align: center;
	}

	.flex-sub {
		flex: 1;
	}

	.text-blue {
		color: #0081ff;

	}

	.text-white {
		color: #ffffff;
	}

	.bg-white {
		background-color: #ffffff;
	}

	.bg-blue {
		background-color: #0081ff;

	}

	.text-orange {
		color: #f37b1d
	}

	.text-xl {
		font-size: 36upx;
	}





	.detail {}

	.table {
		-webkit-animation: ani2 3s linear infinite;
		-webkit-animation: myfirst 1.5s;
		height: 950rpx;
		border: 0px solid darkgray;
		font-size: 12px;
		border-radius: 25rpx;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: -17rpx;
		display: inline-block;
		margin: 0 auto;
		width: 91.5%;
		margin-top: 100rpx;
	}

	.td {

		overflow: hidden;
		width: 170rpx;
		height: 80rpx;
		justify-content: center;
		text-align: center;
		align-items: center;
		word-wrap: break-word;
		flex-shrink: 0;
		line-height: 80rpx;
		border: solid 1rpx rgb(255, 255, 255);
		// border-radius: 5rpx;
		color: #5e5c61;
		// background-color: #fca761;
		background-color: #ffffff;
		border-right: 1rpx solid #ebebeb;
		font-weight: 600;
		font-size: xx-small;
		font-size: 9rpx;
		float: left;

		&-plan {
			width: 112rpx;
			padding: 0;
			margin: 0;
			// background-color: #626262;
			display: flex;
			// font-size: 10rpx;
			// color: #818181;
		}
	}

	.gray {

		background-color: #f7f7f7;
		// border-radius: 15rpx;
		color: #5e5c61;
		// color:#FFFFFF;

	}

	.tabIndex {
		-webkit-animation: ani2 3s linear infinite;
		-webkit-animation: myfirst 1.5s;
		height: 1000rpx;
		border: 0px solid darkgray;
		font-size: 12px;
		border-radius: 25rpx;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		display: inline-block;

		&-tabIndex3 {
			padding: 50rpx 7rpx;
			// background-color: #818181;
			height: 1300rpx;
		}

		&-tabIndex1 {

			padding: 100rpx 210rpx;

		}

		width: 750rpx;
		// margin-top: 100rpx;
	}

	.tabIndex3 {
		-webkit-animation: ani2 3s linear infinite;
		-webkit-animation: myfirst 2s;
		height: 1000rpx;
		border: 0px solid darkgray;
		font-size: 12px;
		border-radius: 25rpx;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		display: inline-block;
		margin: 0 110rpx;
		width: 69%;
		margin-top: 80rpx;

	}

	.tr {
		display: flex;
		width: 685rpx;
		align-items: center;
		height: 80rpx;

		&-trJoin {
			width: 200rpx;
		}

		&-trPlan {
			width: 340rpx;

			&-break {

				justify-content: center;
				width: 990rpx;
			}

			&-break2 {

				justify-content: center;
				width: 685rpx;
			}
		}
	}

	.tabIndex-tabIndex3[data-v-92d10d60] {
		padding: 7px 3px;
		height: 650px;
	}
</style>
